<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> 
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="/WEB-INF/tld/waybillStatus.tld" prefix="ws" %> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>到货预报运单审批</title>
		<link rel="stylesheet" type="text/css" href="btn_class.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/resources/css/ext-all.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/style.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/desktop.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/ext-patch.css" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

		<script type="text/javascript">
		<%String uId = (String) session.getAttribute("Uid");
			if (uId == null || uId.equals("null")) {%>
			window.parent.location.href = 'index.jsp';
		<%}%>
		function topage(currentPage){
			var f = document.forms["waybillForm"];
			f.action = "waybill!showAllwbByStatus.do?currentPage="+currentPage+"&status=forecastStatus";
			f.submit();
		}
	
		window.onload=function(){
			if('<%=request.getAttribute("flag")%>'=='SUCCESS'){
				alert("状态更改成功!");
			}
			
		}
		function queryWaybill(){
			
			var wbUps = document.getElementById("wbUps").value;
			var Uid = document.getElementById("Uid").value;
			var status = "forecastStatus"; 
			
			if(wbUps=="" && Uid=="")
			{
				alert("请输入查询条件！");
				return;
			}
			var f = document.forms["searchForm"];
			f.action = "waybill!searchWaybillForecast.do?wbStatus="+status+"&wbUps="+wbUps+"&Uid="+Uid;
			f.submit();
		}
		
		</script>
		<style type="text/css">
			.showValue6
			{
				color : #00309c;
			} 
			.bm
			{
				color : #0b5199;
				font-size : 12px;
				font-weight : bold;
			}
   		</style>
 
	</head>

	
<body style="background:white"> 
	<div class="x-panel-header x-panel-header-noborder x-unselectable" id="ext-gen8" style="mozuserselect: none; khtmluserselect: none;" unselectable="on">
		<span class="x-panel-header-text" >审批运单</span>
	</div>
		<form name="searchForm" method="post">
	 <table width="700px" border="0" cellSpacing="3" cellPadding="3">
		 	<tr>
		 		<td align="right" width="150px"><font style="font-size:15px">快递号：</font></td>
		 		<td align="left" width="300px"><input  type="text"  name="wbUps" id="wbUps" style="width:100%;"/></td>
		 		
		 	</tr>
		 		<tr>
		 		<td align="right" width="150px"><font style="font-size:15px">Uid：</font></td>
		 		<td align="left" width="300px"><input  type="text"  name="Uid" id="Uid" style="width:100%;"/></td>
		 	</tr>
		 		<tr>
		 	<td align="center">&nbsp;</td>
		 		<td align="left" >
		 			<input style="margin-left:20px"  type="button" class="submit_btn"  onclick="queryWaybill();" value="查询" />
		 		</td>
		 	</tr>
	</table>
	</form>
	<br/>

	<table width="100%" border="0" cellSpacing="3" cellPadding="3">
		<tr><td align="center" bgColor="#ffffff">		
			<table width="100%" style="border-bottom: #c2cbec 1px solid; border-left: #c2cbec 1px solid; border-top: #c2cbec 1px solid; border-right: #c2cbec 1px solid;" bgColor="#fafafa" border="0" cellSpacing="0" cellPadding="0">
			 	<tr align="center">
			 	
			 	<!-- 	<td width="5%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><input id="checkFlag" type="checkbox" onclick="checkAll()"/></td> -->
			 		<td width="12%" height="28" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>订单编号</b></td>
			 		<!-- 显示提交者的姓名  和 唯一标示符 -->
			 		<td width="10%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>仓库</b></td>
			 		<td width="10%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>唯一标示符</b></td>
			 		<td width="12%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>Ups号</b></td>
			 		<td width="10%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>重量(Lbs)</b></td>	
			 		<td width="15%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>当前状态</b></td>
			 		<td width="15%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>提交日期</b></td>
			 		<td width="15%" background="images/om.gif" style="border-right: #c2cbec 1px solid;"><b>管理员操作</b></td>
			 	</tr>
			 	<s:iterator id="wb" value="forestList">
			 	<tr align="center" class="showValue6" style="line-height: 120%;">
			 		<td height="26" style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;">
			 			<s:property value="#wb.wbId"/>&nbsp;
			 		</td>
			 		<td style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;">
			 				<s:property value="#wb.wbArea"/>&nbsp;
			 		</td>
			 		<td style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;">
			 				<s:property value="#wb.Uid"/>&nbsp;
			 		</td>
			 			<td style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;">
			 				<s:property value="#wb.wbUps"/>&nbsp;
			 		</td>
			 			<td style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;">
			 				<s:property value="#wb.wbEnterWeight"/>&nbsp;
			 		</td>
			 		<td style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;">
			 			<b>	 <ws:translateStatus enStatus="${wb.wbStatus}"></ws:translateStatus></b>&nbsp;
			 		</td>
			 		<td style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;">
			 				<s:property value="#wb.wbForecastStatusTime"/>&nbsp;
			 		</td>
			 		<td style="border-bottom: #c6def0 1px solid; border-top: #999999 1px solid; border-right: #c6def0 1px solid;" >
			 			<a class="bm" href="waybill!approvalWaybillA.do?wbId=<s:property value="#wb.wbId"/>&status=forecastStatus&flag=searchForecast">审批</a>
			 			&nbsp;
			 		</td>
			 	</tr>
			 </s:iterator>
			 <c:if   test= "${empty forestList}"> 
			 	<font style="color:red">无此运单，请重新输入!</font>
			 </c:if>
			 </table>
			</td>
		</tr>
		 
		 </table>
    </body> 
</html>
